package com.zk.nakedfowl.powerManager.pojo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import com.zk.nakedfowl.barcodeMachineGrantManager.pojo.MachineGrant;
import com.zk.nakedfowl.barcodeMachineGrantManager.pojo.MachineRecovery;

import javax.persistence.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * 实体类
 * @author Administrator
 *
 */
@Entity
@Table(name="sys_user")
@JsonIgnoreProperties({"hibernateLazyInitializer","handler"})
public class User implements Serializable{

	@Id
	private String id;//


	
	private String loginName;//登录名
	private String password;//密码
	private String name;//姓名
	private String email;//邮箱
	private String phone;//phone
	private String mobile;//手机
	private String sex;//性别
	private String idCard;//ID卡编号
	private String createBy;//创建者
	private java.util.Date createDate;//创建时间
	private String updateBy;//更新者
	private java.util.Date updateDate;//更新时间


	private String role;//所属角色的英文名（role.enname字段）

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}


	@OneToMany(mappedBy = "user")
	private Set<MachineGrant> machineGrants = new HashSet<>();

	@OneToMany(mappedBy = "user")
	private Set<MachineRecovery> machineRecoveries = new HashSet<>();


	public Set<MachineGrant> getMachineGrants() {
		return machineGrants;
	}

	public void setMachineGrants(Set<MachineGrant> machineGrants) {
		this.machineGrants = machineGrants;
	}

	public Set<MachineRecovery> getMachineRecoveries() {
		return machineRecoveries;
	}

	public void setMachineRecoveries(Set<MachineRecovery> machineRecoveries) {
		this.machineRecoveries = machineRecoveries;
	}

	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}

	public String getLoginName() {		
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getPassword() {		
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}

	public String getName() {		
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {		
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {		
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getMobile() {		
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getSex() {		
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getIdCard() {		
		return idCard;
	}
	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public String getCreateBy() {		
		return createBy;
	}
	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public java.util.Date getCreateDate() {		
		return createDate;
	}
	public void setCreateDate(java.util.Date createDate) {
		this.createDate = createDate;
	}

	public String getUpdateBy() {		
		return updateBy;
	}
	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	public java.util.Date getUpdateDate() {		
		return updateDate;
	}
	public void setUpdateDate(java.util.Date updateDate) {
		this.updateDate = updateDate;
	}


	
}
